package com.tjetc.output;

import org.junit.jupiter.api.Test;

import java.io.FileWriter;
import java.io.IOException;

public class _2FileWriter {


    @Test
    public void testFileWriter() throws IOException {
        FileWriter writer =
                new FileWriter("/Users/gaoyongxiang/百度网盘/IDEA-Java/202507-java-se/chapter16/file/hello.txt", true);
        writer.write("abc");
        writer.close();
    }

    @Test
    public void testFileWriter1() throws IOException {
        FileWriter writer =
                new FileWriter("/Users/gaoyongxiang/百度网盘/IDEA-Java/202507-java-se/chapter16/file/hello.txt", true);
        char[] chars = {'a', 'b', 'c'};
        writer.write(chars);
        writer.close();
    }
}
